﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Krile.Kernel;
using Krile.Kernel.Data;

namespace Wassrile.Operation.DataClasses
{
    public sealed class WUser : User
    {
        const string ProfilePageUri = "http://wassr.jp/user/";
        const string ProfileImageUri = "http://wassr.jp/user/";
        const string ProfileImageFile = "/profile_img.png.128.";

        /// <summary>
        /// this prop is read-only.
        /// </summary>
        public override string ParentServiceId
        {
            get { return Define.ServiceId; }
        }

        private Uri overridedIconUri = null;

        /// <summary>
        /// this prop is read-only.
        /// </summary>
        public override Uri IconUri
        {
            get
            {
                if (overridedIconUri != null)
                    return overridedIconUri;
                else
                    return new Uri(ProfileImageUri + this.Id + ProfileImageFile);
            }
            set { overridedIconUri = value; }
        }

        /// <summary>
        /// this prop is read-only.
        /// </summary>
        public override Uri ProfileUri
        {
            get { return new Uri(ProfilePageUri + this.Id); }
            set { }
        }

    }
}
